<?php
namespace app\common\model;
class Agent extends Base{
    protected $pk = 'id';
    
    public function isAgent($userId, $merchantId) {
        $result = $this->where(['user_id' => $userId, 'merchant_id' => $merchantId])->field($this->pk)->find();
        return $result ? true : false;
    }
}